/**
 * 文案处理工具
 * 
 * @author 杨斌
 * @since 2019-05-19
 */
var messages = {
    'param error, name: factoryId, type: missing': '请填写xxx',
    'param error, name: accountNumber, type: malformed': '银行账号格式有误',
    'system error': '服务器开小差了'
};

var api = {
    get: function(msg){
        var theMsg = messages[msg];
        if(theMsg){
            console.log(`翻译[%s]=>[%s]`, msg, theMsg);
            //TODO 处理模式
            return theMsg;
        }else{
            console.log(`未翻译[%s]`, msg);
            return msg;
        }
    }
};

export default api